﻿using System;
using System.Collections.Generic;
using System.Web;
using ltModel.Model;
using System.Text;
using System.Data.SqlClient;

namespace ltModel.DAL
{
    /// <summary>
    /// Summary description for ProjectStreetDAL
    /// </summary>
    public class ProjectStreetDAL
    {
        public ProjectStreetDAL()
        {
            //
            // TODO: Add constructor logic here
            //
        }

        /// <summary>
        /// Get project street list
        /// </summary>
        public List<ProjectStreet> GetList()
        {
            List<ProjectStreet> listStreets = new List<ProjectStreet>();
            string strSql = "select * FROM lt_ProjectStreet";

            SqlDataReader dr = DataObject.ExecuteReader(strSql.ToString());
            ProjectStreet model = null;
            while (dr.Read())
            {
                model = new ProjectStreet();
                model.StreetID = Convert.ToInt32(dr["StreetID"]);
                model.StreetName = dr["StreetName"].ToString();
                listStreets.Add(model);
            }

            return listStreets;
        }
    }
}